const { Sequelize, QueryTypes, DataTypes, Model, Op, fn} = require('@sequelize/core');
// const db = new Sequelize('saas', 'postgres', 'Angchou32312', {
//     dialect: 'postgres',
//     host: 'localhost',
//     port: 5432,
//     dialectOptions:{
//         useUTC: false,
//     },
//     timezone:'+08:00'
// } );

const db = new Sequelize('v4', 'sa', 'Angchou32312', {
    dialect: 'mssql',
    host: 'localhost',//
    // host: '47.109.45.111',
    // port: 1433,
    logging: false, // 控制台日志显示，包括sql
    dialectOptions:{
        options: {
            useUTC: false,
            dateFirst: 1,
            requestTimeout: 999999
        },
    },
} );

module.exports = {db, QueryTypes, DataTypes, Model, Op, fn}
